<template>
  <div>
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="用户名">
      <el-input v-model="formInline.name" placeholder="审批人"></el-input>
    </el-form-item>
    <el-form-item label="密码">
      <el-input type="password" v-model="formInline.password" placeholder="审批人"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="login">查询</el-button>
    </el-form-item>
  </el-form>
  </div>
</template>
<script>
import req from '../request'
export default {
  name:'login',
  data(){
    return {
      formInline:{
        name:'sysadmin',
        password:'ffstSgX8q9AO95QMD7Cgqg=='
      },
    }
  },
  mounted(){
    this.init()
  },
  methods:{
    async init(){
      let res = await req.post('/myehr/systemParam/InitZM.action')
    },
    login(){
//       _eosFlowAction: 
// login
// winWide: 
// userCode: 
// sysadmin
// ipAddress: 
// 220.112.121.55
// password: 
// 116062
// userPassword: 
// ffstSgX8q9AO95QMD7Cgqg==
// falg: 
// optionsRadios: 
// zh
      // let params = new FormData()
      // params.append('_eosFlowAction','login')
      // params.append('optionsRadios','zh')
      // params.append('winWide','')
      // params.append('flag','')
      // params.append('userCode','sysadmin')
      // params.append('password','116062')
      // params.append('userPassword','ffstSgX8q9AO95QMD7Cgqg==')
      // params.append('ipAddress','220.112.121.55')
      let params = {
        _eosFlowAction:'login',
        optionsRadios:'zh',
        winWide:'',
        flag:'',
        userCode:'sysadmin',
        password:'116062',
        userPassword:'ffstSgX8q9AO95QMD7Cgqg==',
        ipAddress:'101.46.121.204'
      }
      req.post('/myehr/user/login.action',params,{
        headers:{'Content-Type':'application/x-www-form-urlencoded'},
      })
    }
  }
}
</script>
